home *** CD-ROM | disk | FTP | other *** search
- ###########################################################################
- #
- # MailShield Main Configuration file
- #
- # This file sets the generic parameters for MailShield, and is loaded
- # once when MailShield starts up.
- #
- # You MUST set the following: SMTP SERVER, DNS SERVERS
- #
- # We also recommend that you set these: LOCAL DOMAIN NAMES
- # HOSTNAMES TO ALLOW RELAYING, TCP/IP ADDRESSES TO ALLOW RELAYING
- #
- # The other settings effect how how the various filters work, and are
- # optional.
- #
- # The $dir_config variable is automatically set to the directory
- # named "config" in your MailShield directory. If you want to read files
- # from elsewhere, you can redefine the $dir_config variable, or point
- # elsewhere.
- #
- ###########################################################################
-
- # SMTP server
- $smtp_server = &ReadConfigFile($dir_config.'smtpserv.txt');
-
- # TCP/IP addresses
- @bind = &FileToArray($dir_config.'tcpip.txt');
-
- # Simultaneous connection limit
- $connection_limit = &ReadConfigFile($dir_config.'connects.txt');
-
- # Disable reverse DNS lookups
- $disable_rvn = &ReadConfigFile($dir_config.'offrdns.txt');
-
- # Syslog setting
- $syslog = &ReadConfigFile($dir_config.'syslog.txt');
-
- # Large Message pass-through setting
- $large_passthrough = &ReadConfigFile($dir_config.'large.txt');
-
- # DNS servers
- $dns_server = &ReadConfigFile($dir_config.'dns.txt');
-
- # Admin email address
- $admin_email = &ReadConfigFile($dir_config.'admin.txt');
-
- # Configuration reload check interval
- $check_interval = &ReadConfigFile($dir_config.'check.txt');
-
- # TCP/IP addresses to allow relaying
- @relay_ok_tcpip = &FileToArray($dir_config.'okrelayt.txt');
-
- # Hostnames to allow relaying
- @relay_ok_hostnames = &FileToArray($dir_config.'okrelayd.txt');
-
- # Local domain names
- @local_domains = &FileToArray($dir_config.'localdom.txt');
-
- # Domains to canonize
- @canonize = &FileToArray($dir_config.'canonize.txt');
-
- # Hostnames to tarpit
- @tarpit_hostnames = &FileToArray($dir_config.'tarpitd.txt');
-
- # TCP/IP addresses to tarpit
- @tarpit_addresses = &FileToArray($dir_config.'tarpitt.txt');
-
- # Tarpit delay
- $tarpit_delay = &ReadConfigFile($dir_config.'tardelay.txt');
-
- # Smtp receive port
- $smtp_receive_port = &ReadConfigFile($dir_config.'smtpport.txt');
-
- # Mailshield activation code
- $serial = &ReadConfigFile($dir_config.'activate.txt');
-
- # Log filename
- $logfile = &ReadConfigFile($dir_config.'logname.txt');
-
- # Log how much information?
- $loglevel = &ReadConfigFile($dir_config.'loglevel.txt');
-
- # Banned TCP/IP addresses
- @banned_tcpip = &FileToArray($dir_config.'bantcpip.txt');
-
- # Banned domain names
- @banned_domains = &FileToArray($dir_config.'bandom.txt');
-
- # Banned smtp helo text
- @banned_helo = &FileToArray($dir_config.'banhelo.txt');
-
- # Require valid hostname for helo
- $require_helo_hostname = &ReadConfigFile($dir_config.'helohost.txt');
-
- # Helpful refuse message
- $helpful_refuse_message = &ReadConfigFile($dir_config.'refushlp.txt');
-
- # Approved smtp MAIL FROM:<> text
- @ok_mail_from = &FileToArray($dir_config.'okmailfr.txt');
-
- # Banned smtp mail from text
- @banned_mail_from = &FileToArray($dir_config.'banmfrom.txt');
-
- # Reject source routed mail from
- $reject_routed_email = &ReadConfigFile($dir_config.'rejsrc.txt');
-
- # Dynamically check recipients
- $chk_rcpt = &ReadConfigFile($dir_config.'chkrcpt.txt');
-
- # Reject invalid mail from
- $reject_invalid_mail_from = &ReadConfigFile($dir_config.'badmfrom.txt');
-
- # Reject no hostname
- $reject_no_hostname = &ReadConfigFile($dir_config.'noname.txt');
-
- # SMTP beginning text
- $begin_connection_message = &ReadConfigFile($dir_config.'begintxt.txt');
-
- # Banned rcpt to
- @no_rcptto = &FileToArray($dir_config.'banrcpt.txt');
-
- # Approved RCPT TO:<> text
- @ok_rcptto = &FileToArray($dir_config.'okrcptto.txt');
-
- # Approved To: header text
- @ok_to = &FileToArray($dir_config.'okto.txt');
-
- # Reject unauthorized relaying
- $reject_relaying = &ReadConfigFile($dir_config.'norelay.txt');
-
- # Maximum number of rcpt to
- $max_rcpt_to = &ReadConfigFile($dir_config.'maxrcpt.txt');
-
- # Maximum number of rcpt to before slighty tarpitting comes into effect
- $tarpit_rcpt_to_threshold = &ReadConfigFile($dir_config.'rcpttar.txt');
-
- # Maximum Received: header line size
- $max_recv = &ReadConfigFile($dir_config.'maxrecv.txt');
-
- # Banned FROM: header
- @banned_from = &FileToArray($dir_config.'banfrom.txt');
-
- # Enable MailShield mail merge support
- $enable_mail_merge = &ReadConfigFile($dir_config.'mailmerg.txt');
-
- # Reject no FROM: header
- $reject_no_from = &ReadConfigFile($dir_config.'nofrom.txt');
-
- # Reject no SUBJECT: header
- $reject_no_subject = &ReadConfigFile($dir_config.'nosubj.txt');
-
- # Reject no Date: header
- $reject_no_date = &ReadConfigFile($dir_config.'nodate.txt');
-
- # Reject no TO: header
- $reject_no_to = &ReadConfigFile($dir_config.'noto.txt');
-
- # Reject invalid FROM: header
- $reject_invalid_from = &ReadConfigFile($dir_config.'badfrom.txt');
-
- # Reject invalid TO: header
- $reject_invalid_to = &ReadConfigFile($dir_config.'badto.txt');
-
- # Reject empty MAIL FROM
- $reject_empty_mail_from = &ReadConfigFile($dir_config.'nomfrom.txt');
-
- # Banned message text
- @banned_text = &FileToArray($dir_config.'bantext.txt');
-
- # Banned header text
- @banned_header = &FileToArray($dir_config.'banhdr.txt');
-
- # Banned received: header text
- @banned_recv = &FileToArray($dir_config.'banrecv.txt');
-
- # Banned TO: text
- @banned_to = &FileToArray($dir_config.'banto.txt');
-
- # Banned subject text
- @banned_subject = &FileToArray($dir_config.'bansubj.txt');
-
- # Banned subject prefix text
- @banned_subject_prefix = &FileToArray($dir_config.'bansubjp.txt');
-
- # Banned x-mailer text
- @banned_xmailer = &FileToArray($dir_config.'banxmail.txt');
-
- # Banned MIME filename text
- @banned_attachment_filenames = &FileToArray($dir_config.'banfname.txt');
-
- # Maximum message size
- $max_message_size = &ReadConfigFile($dir_config.'maxsize.txt');
-
- # Maximum message lines
- $max_message_lines = &ReadConfigFile($dir_config.'maxlines.txt');
-
- # Maximum attachment filename size (in characters)
- $max_attachment_filename_length = &ReadConfigFile($dir_config.'maxflen.txt');
-
- # Maximum recipients
- $max_recipients = &ReadConfigFile($dir_config.'maxrecip.txt');
-
- # Detect HELO field tampering in the Received header line
- # feature is disabled until is more thoroughly tested
- #$helo_tampering = &ReadConfigFile($dir_config.'helotamp.txt');
-
- # Reject forged date header
- $reject_forged_date_header = &ReadConfigFile($dir_config.'rejfdate.txt');
-
- # Reject forged message id header
- $reject_forged_message_id_header = &ReadConfigFile($dir_config.'rejfid.txt');
-
- # Slow down messages with many recipients
- $slow_threshold = &ReadConfigFile($dir_config.'slowdown.txt');
-
- # Block messages with blank MAIL FROM and more than one recipient specified
- $onercpt = &ReadConfigFile($dir_config.'onercpt.txt');
-
- # Realtime Blackhole List (RBL)
- $use_rbl = &ReadConfigFile($dir_config.'rbl.txt');
-
- # Open Relay Blocking System (ORBS)
- # Curently disabled because ORBS is now offline, as of 12/1/98
- $use_orbs = &ReadConfigFile($dir_config.'orbs.txt');
-
- # MAPS Relay Spam Stopper (RSS)
- $use_rss = &ReadConfigFile($dir_config.'rss.txt');
-
- # Dialup User List (DUL)
- $use_dul = &ReadConfigFile($dir_config.'dul.txt');
-
- # RBL+ Master Service
- $use_rbl_plus = &ReadConfigFile($dir_config.'rbl-plus.txt');
-
- # Append helpful SMTP information
- $append_smtp_info = &ReadConfigFile($dir_config.'smtpinfo.txt');
-
- # Forward rejected mail to email address
- $receive_suspicious_email = &ReadConfigFile($dir_config.'forwmail.txt');
-
- # Backup mail server
- $backup_mail_server = &ReadConfigFile($dir_config.'backmail.txt');
-
- # Mark subject instead of refusing
- $mark_subject = &ReadConfigFile($dir_config.'marksubj.txt');
-
- # Port on which the Tcl Web server is running
- $web_port = &ReadConfigFile($dir_config.'webport.txt');
-
- # Tcp/ip address where the web server is installed
- $web_tcpip = &ReadConfigFile($dir_config.'webtcpip.txt');
-
- # END OF SETTINGS
-
-
- ###########################################################################
- # SMTP rules
- #
- # Defines the script that is run at each step of the SMTP transaction.
- #
- # This is where the anti-spam and anti-mail-bomb settings are configured.
- #
- # You can specify a script directly into the variable, or read a file
- # into a variable by using &ReadFile();
- #
- # Note: the $dir_rules variable is automatically set to the directory
- # named "rules" in your MailShield directory. If you want to read files
- # from elsewhere, you can redefine the $dir_rules variable, or point
- # elsewhere.
- #
- $smtp_rule{'connection_begins'} = &ReadFile($dir_rules.'begin.mml');
- $smtp_rule{'after_helo'} = &ReadFile($dir_rules.'helo.mml');
- $smtp_rule{'after_mail_from'} = &ReadFile($dir_rules.'mailfrom.mml');
- $smtp_rule{'after_rcpt_to'} = &ReadFile($dir_rules.'rcptto.mml');
- $smtp_rule{'after_data'} = &ReadFile($dir_rules.'user.mml').&ReadFile($dir_rules.'data.mml');
-
-
- ###########################################################################
- # Standards file
- #
- # This is the standard definitions file, which contains subroutines
- # commonly used in MailShield, such as the Default Rejection procedure.
-
- require $dir_rules."standard.mml";
-
-
-
- ###########################################################################
- #
- # Note, these variables are defined by MailShield when later scripts run:
- #
- # $PeerTcpip - the TCP/IP address of the host connected to us
- # $PeerHostname - the Internet hostname of the host connected to us
- # $MyHostname - the Internet hostname address of this machine
- # $MyTcpip - the TCP/IP address of this machine
- # $SmtpHelo - the value passed to us by the SMTP "HELO" command
- # $SmtpMailFrom - the value passed to us by the SMTP "MAIL FROM" command
- # $SmtpRcptTo - the value passed to us by the most recent SMTP "RCPT TO" command
- # @SmtpRcptTo - all the values so far passed to us by the SMTP "RCPT TO" command
- # $SmtpData - the value passed to us by the SMTP "DATA" command (this is the message header and body) [removed in v1.1]
- # @Data - the value passed to us by the SMTP "DATA" command (this is the message header and body),
- # with each line of the message as an array element. This is what is actually sent. [removed in v1.1]
- # $Body - the body text portion of the current message [removed in v1.1]
- # $Header - the header text portion of the current message
- # $DataBytes - the byte size of the DATA portion of the current message
- # $DataLines - the number of individual lines in the DATA portion of the current message
- #
- ###########################################################################
-
-
-